import {createRouter, createWebHashHistory} from 'vue-router'

const router = createRouter({
    history: createWebHashHistory(),
    routes: [
        {
            path: '/login',
            name: 'LoginName',
            component: () => import('../pages/Login')
        },
        {
            path: '/',
            name: 'MainName',
            component: () => import('../views/Main'),
            children: [
                {
                    path: '/home',
                    name: 'HomeName',
                    component: ()=> import('../pages/Home'),
                    meta: {
                        isClosed: true
                    }
                },
                {
                    path: '/basicButton',
                    name: 'BasicButtonName',
                    component: () => import('../pages/Basic/Button')
                },
                {
                    path: '/basicBorder',
                    name: 'BasicBorderName',
                    component: () => import('../pages/Basic/Border')
                },
                {
                    path: '/basicColor',
                    name: 'BasicColorName',
                    component: () => import('../pages/Basic/Color')
                },
                {
                    path: '/dataAvatar',
                    name: 'DataAvatarName',
                    component: () => import('../pages/Data/Avatar')
                },
                {
                    path: '/dataBadge',
                    name: 'DataBadgeName',
                    component: () => import('../pages/Data/Badge')
                },
                {
                    path: '/dataCalendar',
                    name: 'DataCalendarName',
                    component: () => import('../pages/Data/Calendar')
                },
                {
                    path: '/formAutocomplete',
                    name: 'FormAutocompleteName',
                    component: () => import('../pages/Form/Autocomplete')
                },
                {
                    path: '/formCascader',
                    name: 'FormCascaderName',
                    component: () => import('../pages/Form/Cascader')
                },
                {
                    path: '/formCheckbox',
                    name: 'FormCheckboxName',
                    component: () => import('../pages/Form/Checkbox')
                },
                {
                    path: '/redirect',
                    name: 'RedirectName',
                    component: () => import('../views/Redirect')
                },
            ]
        }
    ]
})

export default router